//费用类别
export enum CostCategory {
	Water = "水费",
	Electricity = "电费",
	Gas = "燃气"
}

export enum RoomType {
	zhuWo = "主卧",
	tingWo = "厅卧",
	nanCiWo = "南次卧",
	beiCiWo = "北次卧",
	tingWo_2 = "厅卧2",
	nanCiWoOld = "老南次卧",
	nanCiWoNew = "新南次卧"
}

export interface CostConfig {
	costCategory: CostCategory | string; //，由于pinia保存数据时，无法使用枚举，所以也要兼容string类型
	roomConfigs: CostRoomConfig[];
}

export interface CostRoomConfig {
	roomType: RoomType | string; //房间，由于pinia保存数据时，无法使用枚举，所以也要兼容string类型
	parts: number;
}

// export interface RoomCostConfig {
// 	costCategory: CostCategory; //
// 	parts: number
// }

export interface CostInfo {
	costCategory: CostCategory; //费用类别
	totalMoney: string; //总费用或区间总费用  //区间内的总费用 = 区间天数 / 总天数 * 总费用
	startDate: string; //2025-01-01
	endDate: string; //2025-01-01
	days: number; //根据startDate和endDate计算总天数
	childrens: CostInfoChildren[]; //费用细分，根据人员变动，将总费用拆分
}

//费用拆分项
export interface CostInfoChildren extends CostInfo {
	id: string;
	mean: number; //平均费用 = 区间内总费用 / 份数
	desc: string; //xx入住
	payRoomsText: string; //需要支付的房间
	payRooms: PayRoomInfo[]; //需要支付的房间
}

//需要支付的房间
export interface PayRoomInfo {
	isSelected: boolean; //
	costRoomConfig: CostRoomConfig;
}

//水/电/燃气费合计
export interface CostAddUpInfo {
	// costCategory: CostCategory; //费用类别
	roomType: RoomType | string; //房间
	totalMoney: number; //需要支付的费用
	totalMoneyDes: string; //费用计算明细
}

//水、电、燃气费总合计
export interface RoomCostAddUpInfo {
	roomType: RoomType | string; //房间
	costInfo: CostAddUpInfo[];
	totalMoney: number; //需要支付的水电燃气总费用
	totalMoneyDes: string; //费用计算明细
}
